package net.yunzhanyi.client.service;

import com.github.pagehelper.PageInfo;
import net.yunzhanyi.client.domain.dto.PoetryDto;
import net.yunzhanyi.client.domain.vo.PageVo;
import net.yunzhanyi.client.domain.vo.PoetryVo;
import net.yunzhanyi.generic.domain.model.*;

import java.util.List;

/**
 * @author bestct
 * @date 2022/8/17
 * @type 接口
 */
public interface PoetryService {
    PageInfo<Poetry> searchPoetry(String keyword, Integer pageNum, Integer pageSize);

    List<String> searchAuthorTip(String keyword);

    List<String> searchPoetryTip(String keyword);

    PageInfo<Author> searchAuthor(String keyword, Integer pageNum, Integer pageSize);


    Author searchAuthorById(Integer authorId);

    List<Poetry> searchAuthorPoetry(Integer authorId, Integer pageNum, Integer pageSize);


    /**
     * @param randomSize 数组大小
     * @return
     */
    List<Part> searchPartRandom(int randomSize);

    /**
     * @return
     */
    List<Author> searchAuthorRandom(int pageSize);

    /**
     * @param poetryId
     * @return
     */
    PoetryVo searchWebPoetryById(Long poetryId);

    /**
     * @param dynasty
     * @param tagId
     * @param pageNum
     * @param pageSize
     * @return
     */
    PageInfo<Poetry> indexPoetry(Integer dynasty, Integer tagId, Integer pageNum, Integer pageSize);

    List<Tag> initTag();

    List<Dynasty> initDynasty();

    PageVo<PoetryDto> copyPageInfo(PageInfo<Poetry> poetryInfo);

    List<Tag> checkTagId(Integer tagId, List<Tag> tagVos);

    PageInfo<Author> indexAuthor(Integer dynasty, Integer pageNum, Integer pageSize);

    PageInfo<Poetry> getPoetryByAuthorId(Long authorId, Integer pageNum, Integer pageSize);

    List<Poetry> searchPoetryRandom(int size);

    Poetry getPoetryByRandom();
}
